Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 5 - Menu Manager Reference / Menu Manager Functions
Initializing the Menu Manager /


InitProcMenu

CHANGED WITH THE APPEARANCE MANAGER

Sets the mbResID field of the current menu list to the resource ID of a custom 'MBDF' resource.

pascal void InitProcMenu (short resID); 
resID
The resource ID of your application's menu bar definition function in the upper 13 bits of this parameter; the variant in the lower 3 bits. You must use a resource ID greater than 0x100. Resource IDs 0x000 through 0x100 are reserved for the use of Apple Computer, Inc.
DISCUSSION
If your application provides its own menu bar definition function, use the InitProcMenu function to associate your custom 'MBDF' resource with the current menu list. In general, you should not use a custom menu bar definition unless absolutely necessary. InitProcMenu creates the current menu list if it hasn't already been created by a previous call to InitMenus .

You can also call InitProcMenu to bypass mapping of the pre-Appearance menu resource ID constant textmenuProc to its corresponding Appearance-compliant menu resource ID constant kMenuStdMenuProc when mapping is enabled. For information on mapping, see "Introduction to the Appearance Manager".

SPECIAL CONSIDERATIONS
The resource ID of your application's menu bar definition function is maintained in the current menu list until your application next calls InitMenus; InitMenus initializes the mbResID field with the resource ID of the standard menu bar definition function. This can affect applications such as development environments that control other applications that may call InitMenus.

WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
Definition function mapping is not supported.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998